package day01;

import java.util.Random;

public class Ex1 {
    public static void main(String[] args) {
        Random random = new Random();
        int i = random.nextInt(5);
        System.out.println("随机数是：" + i);
        switch (i) {
            case 1:
                System.out.println(1);

            case 2:
                System.out.println(2);
                break;
            case 8:
                System.out.println(8);
                break;
            default:
                System.out.println("default");
        }
        if (i == 1) {
            System.out.println(1);
        } else if (i == 2) {
            System.out.println(2);
        }
         else {
            System.out.println("default");
        }

//        String s = "hello";
//
//            String[] names = {"英语","物理","高数"};
//
//        for (int j = 0; j < names.length; j++) {
//            System.out.println(names[j] + 55 + "分");
//        }
//
//        System.out.println(names[1]);

    }
}